﻿#include "MPTestingCharacter.h"

#include "Kismet/GameplayStatics.h"
#include "AITestsCommon.h"


void MPTestingCharacter::OpenLobby()
{
	UWorld* World = GetWorld();
	if(World)
	{
		World->ServerTravel("/Game/ThirdPersonCPP/Maps/Lobby?listen");
	}
}

void MPTestingCharacter::CallOpenLevel(const FString& Address)
{
	UGameplayStatics::OpenLevel(this,*Address);
}



void MPTestingCharacter::CallClientTravel(const FString& Address)
{
	APlayerController * PlayerController = GetGameInstance()->GetFirstLocalPlayerController();

	if (PlayerController)
	{
		PlayerController->ClientTravel(Address,TRAVEL_Absolute);
	}
	
}


